home *** CD-ROM | disk | FTP | other *** search
/ EDUCORP 8 / Educorp2Compilation.sit / educorp2 / Demos / Programmer's Extender / PaintDemo4.c < prev    next >
MacBinary  |  1988-11-18  |  3.8 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Fri Nov 18 01:26:44 1988, modified Fri Nov 18 01:26:44 1988, creator Think C, type ASCII, 3084 bytes "PaintDemo4.c" , at 0xc8c 406 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 50 61 69 6e 74 44 | 65 6d 6f 34 2e 63 00 00 |..PaintD|emo4.c..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 0c 0c 00 | 00 01 96 9f a9 73 24 9f |........|.....s$.|
|00000060| a9 73 24 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.s$.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 6f e5 00 00 |........|....o...|
|00000080| 0d 0d 0d 23 69 6e 63 6c | 75 64 65 3c 65 78 74 65 |...#incl|ude<exte|
|00000090| 6e 64 32 3e 0d 0d 23 69 | 66 64 65 66 20 4d 50 57 |nd2>..#i|fdef MPW|
|000000a0| 47 43 0d 23 64 65 66 69 | 6e 65 20 44 45 4d 4f 72 |GC.#defi|ne DEMOr|
|000000b0| 65 73 46 4e 61 6d 65 31 | 09 22 44 65 6d 6f 32 2e |esFName1|."Demo2.|
|000000c0| 72 73 72 63 22 09 09 2f | 2a 20 72 65 73 6f 75 72 |rsrc"../|* resour|
|000000d0| 63 65 20 66 69 6c 65 09 | 2a 2f 0d 23 64 65 66 69 |ce file.|*/.#defi|
|000000e0| 6e 65 20 57 69 6e 64 6f | 77 54 69 74 6c 65 09 09 |ne Windo|wTitle..|
|000000f0| 22 43 61 70 74 75 72 65 | 64 20 42 69 74 4d 61 70 |"Capture|d BitMap|
|00000100| 22 09 2f 2a 20 77 69 6e | 64 6f 77 73 20 6e 61 6d |"./* win|dows nam|
|00000110| 65 09 2a 2f 0d 23 65 6c | 73 65 09 2f 2a 20 6c 69 |e.*/.#el|se./* li|
|00000120| 67 68 74 73 70 65 65 64 | 09 2a 2f 0d 23 64 65 66 |ghtspeed|.*/.#def|
|00000130| 69 6e 65 20 44 45 4d 4f | 72 65 73 46 4e 61 6d 65 |ine DEMO|resFName|
|00000140| 31 20 20 22 5c 50 44 65 | 6d 6f 32 2e 72 73 72 63 |1 "\PDe|mo2.rsrc|
|00000150| 22 0d 23 64 65 66 69 6e | 65 20 57 69 6e 64 6f 77 |".#defin|e Window|
|00000160| 54 69 74 6c 65 09 09 22 | 5c 50 43 61 70 74 75 72 |Title.."|\PCaptur|
|00000170| 65 64 20 42 69 74 4d 61 | 70 22 0d 23 65 6e 64 69 |ed BitMa|p".#endi|
|00000180| 66 0d 0d 23 64 65 66 69 | 6e 65 20 44 4c 4f 47 61 |f..#defi|ne DLOGa|
|00000190| 62 6f 75 74 09 09 09 31 | 32 33 35 33 09 09 09 09 |bout...1|2353....|
|000001a0| 2f 2a 20 61 62 6f 75 74 | 20 62 6f 78 20 64 69 61 |/* about| box dia|
|000001b0| 6c 6f 67 09 2a 2f 0d 0d | 4f 53 45 72 72 09 09 09 |log.*/..|OSErr...|
|000001c0| 44 6f 47 72 61 62 28 57 | 69 6e 64 6f 77 50 74 72 |DoGrab(W|indowPtr|
|000001d0| 29 3b 0d 09 09 09 09 6d | 61 69 6e 28 76 6f 69 64 |);.....m|ain(void|
|000001e0| 29 3b 0d 0d 45 76 65 6e | 74 52 65 63 6f 72 64 09 |);..Even|tRecord.|
|000001f0| 09 09 09 65 76 65 6e 74 | 3b 0d 45 76 65 6e 74 53 |...event|;.EventS|
|00000200| 74 75 66 66 09 09 09 09 | 77 68 61 74 48 61 70 70 |tuff....|whatHapp|
|00000210| 65 6e 65 64 3b 0d 4d 65 | 6e 75 48 61 6e 64 6c 65 |ened;.Me|nuHandle|
|00000220| 09 09 09 09 61 70 70 6c | 65 4d 65 6e 75 2c 20 66 |....appl|eMenu, f|
|00000230| 69 6c 65 4d 65 6e 75 2c | 20 65 64 69 74 4d 65 6e |ileMenu,| editMen|
|00000240| 75 3b 0d 57 69 6e 64 6f | 77 52 65 63 6f 72 64 09 |u;.Windo|wRecord.|
|00000250| 09 09 57 52 3b 0d 57 69 | 6e 64 6f 77 50 74 72 09 |..WR;.Wi|ndowPtr.|
|00000260| 09 09 09 77 50 74 72 3b | 0d 52 65 63 74 09 09 09 |...wPtr;|.Rect...|
|00000270| 09 09 09 77 52 65 63 74 | 3b 0d 53 46 52 65 70 6c |...wRect|;.SFRepl|
|00000280| 79 09 09 09 09 09 72 65 | 70 6c 79 3b 0d 4f 53 45 |y.....re|ply;.OSE|
|00000290| 72 72 09 09 09 09 09 09 | 65 72 72 3b 0d 69 6e 74 |rr......|err;.int|
|000002a0| 09 09 09 09 09 09 66 52 | 65 66 4e 75 6d 2c 20 69 |......fR|efNum, i|
|000002b0| 74 65 6d 48 69 74 3b 0d | 63 68 61 72 09 09 09 09 |temHit;.|char....|
|000002c0| 09 09 65 72 72 6f 72 53 | 74 72 5b 32 35 36 5d 3b |..errorS|tr[256];|
|000002d0| 0d 0d 0d 4f 53 45 72 72 | 09 09 09 44 6f 47 72 61 |...OSErr|...DoGra|
|000002e0| 62 28 74 61 72 67 65 74 | 57 50 29 0d 09 09 09 09 |b(target|WP).....|
|000002f0| 09 57 69 6e 64 6f 77 50 | 74 72 09 09 74 61 72 67 |.WindowP|tr..targ|
|00000300| 65 74 57 50 3b 0d 7b 0d | 09 42 69 74 4d 61 70 09 |etWP;.{.|.BitMap.|
|00000310| 09 74 68 65 4d 61 70 3b | 0d 09 4f 53 45 72 72 09 |.theMap;|..OSErr.|
|00000320| 09 09 65 72 72 3b 0d 09 | 0d 0d 09 09 65 72 72 20 |..err;..|....err |
|00000330| 3d 20 47 72 61 62 42 69 | 74 73 28 26 74 68 65 4d |= GrabBi|ts(&theM|
|00000340| 61 70 29 3b 0d 09 09 69 | 66 20 28 65 72 72 20 3d |ap);...i|f (err =|
|00000350| 3d 20 6e 6f 45 72 72 29 | 0d 09 09 7b 0d 09 09 09 |= noErr)|...{....|
|00000360| 69 66 20 28 56 61 6c 69 | 64 48 61 6e 64 6c 65 28 |if (Vali|dHandle(|
|00000370| 28 48 61 6e 64 6c 65 29 | 47 65 74 57 50 69 63 28 |(Handle)|GetWPic(|
|00000380| 74 61 72 67 65 74 57 50 | 29 29 29 09 09 2f 2a 20 |targetWP|)))../* |
|00000390| 69 66 20 77 69 6e 64 6f | 77 20 61 6c 72 65 61 64 |if windo|w alread|
|000003a0| 79 20 68 61 73 20 61 20 | 70 69 63 74 75 72 65 09 |y has a |picture.|
|000003b0| 2a 2f 0d 09 09 09 09 4b | 69 6c 6c 50 69 63 74 75 |*/.....K|illPictu|
|000003c0| 72 65 28 47 65 74 57 50 | 69 63 28 74 61 72 67 65 |re(GetWP|ic(targe|
|000003d0| 74 57 50 29 29 3b 09 09 | 09 09 09 2f 2a 20 72 65 |tWP));..|.../* re|
|000003e0| 6c 65 61 73 65 20 69 74 | 73 20 6d 65 6d 6f 72 79 |lease it|s memory|
|000003f0| 20 66 72 6f 6d 20 74 68 | 65 20 68 65 61 70 09 2a | from th|e heap.*|
|00000400| 2f 0d 09 09 09 53 65 74 | 57 50 69 63 28 74 61 72 |/....Set|WPic(tar|
|00000410| 67 65 74 57 50 2c 20 42 | 69 74 73 54 6f 50 69 63 |getWP, B|itsToPic|
|00000420| 28 26 74 68 65 4d 61 70 | 29 29 3b 09 09 09 09 2f |(&theMap|));..../|
|00000430| 2a 20 43 6f 6e 76 65 72 | 74 20 63 61 70 74 75 72 |* Conver|t captur|
|00000440| 65 64 20 62 69 74 4d 61 | 70 20 74 6f 20 51 44 20 |ed bitMa|p to QD |
|00000450| 70 69 63 74 75 72 65 09 | 2a 2f 0d 09 09 09 53 65 |picture.|*/....Se|
|00000460| 74 57 54 69 74 6c 65 28 | 74 61 72 67 65 74 57 50 |tWTitle(|targetWP|
|00000470| 2c 20 57 69 6e 64 6f 77 | 54 69 74 6c 65 29 3b 0d |, Window|Title);.|
|00000480| 09 09 09 4b 69 6c 6c 42 | 69 74 73 28 26 74 68 65 |...KillB|its(&the|
|00000490| 4d 61 70 29 3b 09 09 09 | 09 09 09 09 09 09 09 2f |Map);...|......./|
|000004a0| 2a 20 72 65 6c 65 61 73 | 65 20 6d 65 6d 6f 72 79 |* releas|e memory|
|000004b0| 20 6f 63 63 75 70 69 65 | 64 20 62 79 20 42 69 74 | occupie|d by Bit|
|000004c0| 4d 61 70 09 2a 2f 0d 09 | 09 7d 0d 09 09 72 65 74 |Map.*/..|.}...ret|
|000004d0| 75 72 6e 28 65 72 72 29 | 3b 0d 7d 0d 0d 0d 6d 61 |urn(err)|;.}...ma|
|000004e0| 69 6e 28 29 0d 7b 0d 09 | 58 54 65 6e 64 49 6e 69 |in().{..|XTendIni|
|000004f0| 74 28 29 3b 0d 09 53 74 | 64 4d 65 6e 75 73 28 26 |t();..St|dMenus(&|
|00000500| 61 70 70 6c 65 4d 65 6e | 75 2c 20 26 66 69 6c 65 |appleMen|u, &file|
|00000510| 4d 65 6e 75 2c 20 26 65 | 64 69 74 4d 65 6e 75 29 |Menu, &e|ditMenu)|
|00000520| 3b 0d 09 45 6e 61 62 6c | 65 49 74 65 6d 28 66 69 |;..Enabl|eItem(fi|
|00000530| 6c 65 4d 65 6e 75 2c 20 | 32 29 3b 09 09 09 09 09 |leMenu, |2);.....|
|00000540| 09 2f 2a 20 4f 70 65 6e | 2e 2e 2e 09 2a 2f 0d 09 |./* Open|....*/..|
|00000550| 45 6e 61 62 6c 65 49 74 | 65 6d 28 66 69 6c 65 4d |EnableIt|em(fileM|
|00000560| 65 6e 75 2c 20 35 29 3b | 09 09 09 09 09 09 2f 2a |enu, 5);|....../*|
|00000570| 20 53 61 76 65 09 09 2a | 2f 0d 09 45 6e 61 62 6c | Save..*|/..Enabl|
|00000580| 65 49 74 65 6d 28 66 69 | 6c 65 4d 65 6e 75 2c 20 |eItem(fi|leMenu, |
|00000590| 36 29 3b 09 09 09 09 09 | 09 2f 2a 20 53 61 76 65 |6);.....|./* Save|
|000005a0| 20 41 73 2e 2e 2e 09 2a | 2f 0d 0d 0d 09 66 52 65 | As....*|/....fRe|
|000005b0| 66 4e 75 6d 20 3d 20 4f | 70 65 6e 52 65 73 46 69 |fNum = O|penResFi|
|000005c0| 6c 65 28 44 45 4d 4f 72 | 65 73 46 4e 61 6d 65 31 |le(DEMOr|esFName1|
|000005d0| 29 3b 0d 0d 09 69 66 20 | 28 66 52 65 66 4e 75 6d |);...if |(fRefNum|
|000005e0| 20 3e 3d 20 30 29 0d 09 | 09 45 6e 61 62 6c 65 49 | >= 0)..|.EnableI|
|000005f0| 74 65 6d 28 61 70 70 6c | 65 4d 65 6e 75 2c 20 31 |tem(appl|eMenu, 1|
|00000600| 29 3b 09 09 2f 2a 20 4f | 6e 6c 79 20 65 6e 61 62 |);../* O|nly enab|
|00000610| 6c 65 20 22 41 62 6f 75 | 74 2e 2e 2e 22 20 69 66 |le "Abou|t..." if|
|00000620| 20 72 65 73 6f 75 72 63 | 65 20 61 76 61 69 6c 61 | resourc|e availa|
|00000630| 62 6c 65 09 2a 2f 0d 0d | 09 53 65 74 52 65 63 74 |ble.*/..|.SetRect|
|00000640| 28 26 77 52 65 63 74 2c | 20 31 30 2c 20 35 30 2c |(&wRect,| 10, 50,|
|00000650| 20 35 30 30 2c 20 33 30 | 30 29 3b 0d 09 77 50 74 | 500, 30|0);..wPt|
|00000660| 72 20 3d 20 43 72 65 61 | 74 65 57 69 6e 64 6f 77 |r = Crea|teWindow|
|00000670| 28 26 57 52 2c 20 26 77 | 52 65 63 74 2c 20 22 5c |(&WR, &w|Rect, "\|
|00000680| 50 50 61 69 6e 74 44 65 | 6d 6f 34 22 2c 20 38 2c |PPaintDe|mo4", 8,|
|00000690| 20 54 52 55 45 2c 20 46 | 41 4c 53 45 2c 20 54 52 | TRUE, F|ALSE, TR|
|000006a0| 55 45 2c 20 54 52 55 45 | 2c 20 54 52 55 45 29 3b |UE, TRUE|, TRUE);|
|000006b0| 0d 09 64 6f 0d 09 7b 0d | 09 09 64 6f 0d 09 09 7b |..do..{.|..do...{|
|000006c0| 0d 09 09 09 53 79 73 74 | 65 6d 54 61 73 6b 28 29 |....Syst|emTask()|
|000006d0| 3b 0d 09 09 7d 20 77 68 | 69 6c 65 20 28 21 58 54 |;...} wh|ile (!XT|
|000006e0| 47 65 74 4e 65 78 74 45 | 76 65 6e 74 28 65 76 65 |GetNextE|vent(eve|
|000006f0| 72 79 45 76 65 6e 74 2c | 20 26 65 76 65 6e 74 29 |ryEvent,| &event)|
|00000700| 29 3b 0d 09 09 69 66 20 | 28 28 42 75 74 74 6f 6e |);...if |((Button|
|00000710| 28 29 20 3d 3d 20 54 52 | 55 45 29 20 26 26 20 28 |() == TR|UE) && (|
|00000720| 28 65 76 65 6e 74 2e 6d | 6f 64 69 66 69 65 72 73 |(event.m|odifiers|
|00000730| 20 26 20 73 68 69 66 74 | 4b 65 79 29 20 3d 3d 20 | & shift|Key) == |
|00000740| 73 68 69 66 74 4b 65 79 | 29 29 0d 09 09 7b 0d 09 |shiftKey|))...{..|
|00000750| 09 09 65 72 72 20 3d 20 | 44 6f 47 72 61 62 28 77 |..err = |DoGrab(w|
|00000760| 50 74 72 29 3b 0d 09 09 | 7d 0d 09 09 65 6c 73 65 |Ptr);...|}...else|
|00000770| 0d 09 09 7b 09 09 09 2f | 2a 20 4f 6e 6c 79 20 6e |...{.../|* Only n|
|00000780| 65 65 64 20 74 6f 20 63 | 61 6c 6c 20 48 61 6e 64 |eed to c|all Hand|
|00000790| 6c 65 45 76 65 6e 74 28 | 29 20 69 66 20 47 72 61 |leEvent(|) if Gra|
|000007a0| 62 42 69 74 73 20 77 61 | 73 6e 27 74 20 63 61 6c |bBits wa|sn't cal|
|000007b0| 6c 65 64 09 2a 2f 0d 09 | 09 09 48 61 6e 64 6c 65 |led.*/..|..Handle|
|000007c0| 45 76 65 6e 74 28 26 65 | 76 65 6e 74 2c 20 26 77 |Event(&e|vent, &w|
|000007d0| 68 61 74 48 61 70 70 65 | 6e 65 64 29 3b 0d 09 09 |hatHappe|ned);...|
|000007e0| 09 69 66 20 28 28 77 68 | 61 74 48 61 70 70 65 6e |.if ((wh|atHappen|
|000007f0| 65 64 2e 4d 65 6e 75 48 | 20 3d 3d 20 61 70 70 6c |ed.MenuH| == appl|
|00000800| 65 4d 65 6e 75 29 20 26 | 26 20 28 77 68 61 74 48 |eMenu) &|& (whatH|
|00000810| 61 70 70 65 6e 65 64 2e | 49 74 65 6d 4e 75 6d 20 |appened.|ItemNum |
|00000820| 3d 3d 20 31 29 29 0d 09 | 09 09 09 69 74 65 6d 48 |== 1))..|...itemH|
|00000830| 69 74 20 3d 20 53 68 6f | 77 44 69 61 6c 6f 67 28 |it = Sho|wDialog(|
|00000840| 44 4c 4f 47 61 62 6f 75 | 74 29 3b 09 09 2f 2a 20 |DLOGabou|t);../* |
|00000850| 53 68 6f 77 20 27 41 62 | 6f 75 74 27 20 64 69 61 |Show 'Ab|out' dia|
|00000860| 6c 6f 67 09 2a 2f 0d 09 | 09 09 65 6c 73 65 0d 09 |log.*/..|..else..|
|00000870| 09 09 09 73 77 69 74 63 | 68 20 28 77 68 61 74 48 |...switc|h (whatH|
|00000880| 61 70 70 65 6e 65 64 2e | 49 74 65 6d 4e 75 6d 29 |appened.|ItemNum)|
|00000890| 0d 09 09 09 09 7b 0d 09 | 09 09 09 09 63 61 73 65 |.....{..|....case|
|000008a0| 20 32 3a 09 09 09 09 2f | 2a 20 4f 70 65 6e 09 2a | 2:..../|* Open.*|
|000008b0| 2f 0d 09 09 09 09 09 09 | 72 65 70 6c 79 2e 67 6f |/.......|reply.go|
|000008c0| 6f 64 20 3d 20 46 41 4c | 53 45 3b 09 09 09 09 09 |od = FAL|SE;.....|
|000008d0| 2f 2a 20 46 6f 72 63 65 | 20 75 73 65 72 20 74 6f |/* Force| user to|
|000008e0| 20 6e 61 6d 65 20 66 69 | 6c 65 09 2a 2f 0d 09 09 | name fi|le.*/...|
|000008f0| 09 09 09 09 69 66 20 28 | 56 61 6c 69 64 48 61 6e |....if (|ValidHan|
|00000900| 64 6c 65 28 28 48 61 6e | 64 6c 65 29 47 65 74 57 |dle((Han|dle)GetW|
|00000910| 50 69 63 28 77 50 74 72 | 29 29 29 0d 09 09 09 09 |Pic(wPtr|))).....|
|00000920| 09 09 09 4b 69 6c 6c 50 | 69 63 74 75 72 65 28 47 |...KillP|icture(G|
|00000930| 65 74 57 50 69 63 28 77 | 50 74 72 29 29 3b 0d 09 |etWPic(w|Ptr));..|
|00000940| 09 09 09 09 09 65 72 72 | 20 3d 20 52 65 63 61 6c |.....err| = Recal|
|00000950| 6c 57 50 69 63 28 77 50 | 74 72 2c 20 26 72 65 70 |lWPic(wP|tr, &rep|
|00000960| 6c 79 29 3b 0d 09 09 09 | 09 09 09 69 66 20 28 72 |ly);....|...if (r|
|00000970| 65 70 6c 79 2e 67 6f 6f | 64 20 3d 3d 20 54 52 55 |eply.goo|d == TRU|
|00000980| 45 29 0d 09 09 09 09 09 | 09 09 53 65 74 57 54 69 |E)......|..SetWTi|
|00000990| 74 6c 65 28 77 50 74 72 | 2c 20 72 65 70 6c 79 2e |tle(wPtr|, reply.|
|000009a0| 66 4e 61 6d 65 29 3b 09 | 2f 2a 20 53 65 74 20 77 |fName);.|/* Set w|
|000009b0| 69 6e 64 6f 77 20 74 69 | 74 6c 65 09 2a 2f 0d 09 |indow ti|tle.*/..|
|000009c0| 09 09 09 09 62 72 65 61 | 6b 3b 0d 0d 09 09 09 09 |....brea|k;......|
|000009d0| 09 63 61 73 65 20 35 3a | 09 09 09 09 2f 2a 20 53 |.case 5:|..../* S|
|000009e0| 61 76 65 09 2a 2f 0d 09 | 09 09 09 09 09 65 72 72 |ave.*/..|.....err|
|000009f0| 20 3d 20 53 61 76 65 57 | 50 69 63 28 77 50 74 72 | = SaveW|Pic(wPtr|
|00000a00| 2c 20 26 72 65 70 6c 79 | 29 3b 0d 09 09 09 09 09 |, &reply|);......|
|00000a10| 62 72 65 61 6b 3b 0d 0d | 09 09 09 09 09 63 61 73 |break;..|.....cas|
|00000a20| 65 20 36 3a 09 09 09 09 | 2f 2a 20 53 61 76 65 20 |e 6:....|/* Save |
|00000a30| 41 73 09 2a 2f 0d 09 09 | 09 09 09 09 72 65 70 6c |As.*/...|....repl|
|00000a40| 79 2e 67 6f 6f 64 20 3d | 20 46 41 4c 53 45 3b 09 |y.good =| FALSE;.|
|00000a50| 09 09 09 09 2f 2a 20 46 | 6f 72 63 65 20 75 73 65 |..../* F|orce use|
|00000a60| 72 20 74 6f 20 6e 61 6d | 65 20 66 69 6c 65 09 2a |r to nam|e file.*|
|00000a70| 2f 0d 09 09 09 09 09 09 | 65 72 72 20 3d 20 53 61 |/.......|err = Sa|
|00000a80| 76 65 57 50 69 63 28 77 | 50 74 72 2c 20 26 72 65 |veWPic(w|Ptr, &re|
|00000a90| 70 6c 79 29 3b 0d 09 09 | 09 09 09 09 69 66 20 28 |ply);...|....if (|
|00000aa0| 72 65 70 6c 79 2e 67 6f | 6f 64 20 3d 3d 20 54 52 |reply.go|od == TR|
|00000ab0| 55 45 29 0d 09 09 09 09 | 09 09 09 53 65 74 57 54 |UE).....|...SetWT|
|00000ac0| 69 74 6c 65 28 77 50 74 | 72 2c 20 72 65 70 6c 79 |itle(wPt|r, reply|
|00000ad0| 2e 66 4e 61 6d 65 29 3b | 09 2f 2a 20 53 65 74 20 |.fName);|./* Set |
|00000ae0| 77 69 6e 64 6f 77 20 74 | 69 74 6c 65 09 2a 2f 0d |window t|itle.*/.|
|00000af0| 09 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 09 09 |.....bre|ak;.....|
|00000b00| 7d 3b 0d 09 09 09 69 66 | 20 28 65 72 72 20 21 3d |};....if| (err !=|
|00000b10| 20 6e 6f 45 72 72 29 0d | 09 09 09 7b 0d 23 69 66 | noErr).|...{.#if|
|00000b20| 64 65 66 20 4d 50 57 47 | 43 0d 09 09 09 09 4e 55 |def MPWG|C.....NU|
|00000b30| 4d 54 4f 53 54 52 49 4e | 47 28 65 72 72 2c 20 65 |MTOSTRIN|G(err, e|
|00000b40| 72 72 6f 72 53 74 72 29 | 3b 0d 23 65 6c 73 65 09 |rrorStr)|;.#else.|
|00000b50| 2f 2a 20 6c 69 67 68 74 | 73 70 65 65 64 09 2a 2f |/* light|speed.*/|
|00000b60| 0d 09 09 09 09 4e 75 6d | 54 6f 53 74 72 69 6e 67 |.....Num|ToString|
|00000b70| 28 65 72 72 2c 20 65 72 | 72 6f 72 53 74 72 29 3b |(err, er|rorStr);|
|00000b80| 0d 23 65 6e 64 69 66 0d | 09 09 09 09 42 75 67 41 |.#endif.|....BugA|
|00000b90| 6c 65 72 74 28 22 5c 50 | 45 72 72 6f 72 20 6e 75 |lert("\P|Error nu|
|00000ba0| 6d 62 65 72 20 22 2c 20 | 65 72 72 6f 72 53 74 72 |mber ", |errorStr|
|00000bb0| 2c 20 22 5c 50 20 6f 63 | 63 75 72 72 65 64 2e 22 |, "\P oc|curred."|
|00000bc0| 2c 22 5c 50 22 29 3b 0d | 09 09 09 09 65 72 72 20 |,"\P");.|....err |
|00000bd0| 3d 20 6e 6f 45 72 72 3b | 09 09 2f 2a 20 72 65 73 |= noErr;|../* res|
|00000be0| 65 74 20 65 72 72 6f 72 | 09 2a 2f 0d 09 09 09 7d |et error|.*/....}|
|00000bf0| 0d 09 09 7d 0d 09 09 0d | 09 7d 20 77 68 69 6c 65 |...}....|.} while|
|00000c00| 20 28 45 78 69 74 52 65 | 71 75 65 73 74 28 26 77 | (ExitRe|quest(&w|
|00000c10| 68 61 74 48 61 70 70 65 | 6e 65 64 29 20 3d 3d 20 |hatHappe|ned) == |
|00000c20| 46 41 4c 53 45 29 3b 0d | 09 69 66 20 28 66 52 65 |FALSE);.|.if (fRe|
|00000c30| 66 4e 75 6d 20 3e 3d 20 | 30 29 0d 09 09 43 6c 6f |fNum >= |0)...Clo|
|00000c40| 73 65 52 65 73 46 69 6c | 65 28 66 52 65 66 4e 75 |seResFil|e(fRefNu|
|00000c50| 6d 29 3b 09 09 2f 2a 20 | 43 6c 6f 73 65 20 72 65 |m);../* |Close re|
|00000c60| 73 6f 75 72 63 65 20 66 | 69 6c 65 20 69 66 20 69 |source f|ile if i|
|00000c70| 74 20 77 61 73 20 70 72 | 65 76 69 6f 75 73 6c 79 |t was pr|eviously|
|00000c80| 20 6f 70 65 6e 65 64 09 | 2a 2f 0d 7d 00 00 00 00 | opened.|*/.}....|
|00000c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d00| 00 00 01 00 00 00 01 3c | 00 00 00 3c 00 00 00 5a |.......<|...<...Z|
|00000d10| 20 20 20 20 20 20 20 20 | 20 20 20 09 09 57 69 6e | | ..Win|
|00000d20| 64 6f 77 44 65 6d 6f 32 | 20 20 20 20 20 20 20 20 |dowDemo2| |
|00000d30| 0c 50 61 69 6e 74 44 65 | 6d 6f 34 2e 63 22 02 00 |.PaintDe|mo4.c"..|
|00000d40| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 40 00 c0 |..TEXTKA|HL...@..|
|00000d50| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 40 00 c0 |..TEXTKA|HL...@..|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 9d 2a a7 01 00 00 | 0c 0c 00 00 01 96 74 73 |...*....|......ts|
|00000d80| 70 65 65 64 20 43 20 63 | 6f 6d 70 69 6c 65 72 20 |peed C c|ompiler |
|00000d90| 33 2e 30 09 09 09 09 2a | 2f 0d 0d 23 69 6e 63 6c |3.0....*|/..#incl|
|00000da0| 75 64 65 20 20 3c 65 78 | 74 65 6e 64 65 72 3e 0d |ude <ex|tender>.|
|00000db0| 0d 45 76 65 6e 74 52 65 | 63 6f 72 64 09 09 65 76 |.EventRe|cord..ev|
|00000dc0| 65 6e 74 3b 09 09 09 09 | 09 09 09 09 2f 2a 20 65 |ent;....|..../* e|
|00000dd0| 76 65 6e 74 20 72 65 63 | 6f 72 64 20 73 74 72 75 |vent rec|ord stru|
|00000de0| 63 74 75 72 65 20 69 6e | 73 74 61 6e 63 65 20 20 |cture in|stance |
|00000df0| 2a 2f 0d 45 76 65 6e 74 | 53 74 75 66 66 09 09 77 |*/.Event|Stuff..w|
|00000e00| 00 00 00 2a 00 09 06 4d | 6f 6e 61 63 6f 00 00 00 |...*...M|onaco...|
|00000e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e30| 00 04 00 06 00 03 00 00 | 00 02 00 00 00 00 01 00 |........|........|
|00000e40| 00 00 01 3c 00 00 00 3c | 00 00 00 5a 00 14 5a b2 |...<...<|...Z..Z.|
|00000e50| 04 c8 00 00 00 1c 00 5a | 00 02 45 46 4e 54 00 00 |.......Z|..EFNT..|
|00000e60| 00 1a 45 54 41 42 00 00 | 00 26 45 51 45 44 00 00 |..ETAB..|.&EQED..|
|00000e70| 00 32 03 eb ff ff 00 00 | 00 00 00 00 00 00 03 ec |.2......|........|
|00000e80| ff ff 00 00 00 2e 00 00 | 00 00 03 eb ff ff 00 00 |........|........|
|00000e90| 00 36 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.6......|........|
|00000ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+